﻿using FrameWork.Plugin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyServer.Common;
using System.Windows.Forms;
using FrameWork.Output;
using FrameWork.Setting;

namespace ScreenMonitor.ServerLib.Plugin
{
    /// <summary>
    /// 为服务端插件提供通用接口
    /// </summary>
    public interface IServerPlugin:IPlugin
    {
        /// <summary>
        /// 获取插件的设定编辑器
        /// </summary>
        /// <returns></returns>
        List<SettingEditorItem> GetSettingEditors();

        /// <summary>
        /// 获取插件的主窗体
        /// </summary>
        /// <returns></returns>
        Form GetPluginWindow();

        /// <summary>
        /// 设置插件菜单
        /// </summary>
        /// <param name="MainMenuStrip">表示接纳插件菜单的主菜单</param>
        /// <returns></returns>
        void SetMenu(MenuStrip MainMenuStrip);

        /// <summary>
        /// 获取插件的输出采集器列表
        /// </summary>
        /// <returns></returns>
        IEnumerable<OutputCollectorBase> GetOutputCollectors();

        /// <summary>
        /// 获取当前插件的命令列表
        /// </summary>
        /// <returns></returns>
        List<string> GetCommands();
        /// <summary>
        /// 使当前插件运行指定命令
        /// </summary>
        /// <param name="Command">要运行的命令</param>
        /// <param name="Col">该命令包含的数据</param>
        void RunCommand(string Command, byte[] Data);
    }
}
